import React, { Component } from 'react';

import { Slider} from 'amazeui-touch';

export default class BannerSlider extends Component {

    constructor(props) {
        super(props)
    }

    render() {
        const slider = (
            <Slider controls={false}>
                {
                    this.props.imgs.map((item, ind) => {
                        return (
                            <Slider.Item key={ind}>
                                <div className="item-title">{item.desc}</div>
                                <img src={item.img} alt=""/>
                            </Slider.Item>
                        );
                    })
                }
            </Slider>
        );
        return (
            <div className='home-item'>
                {slider}
            </div>
        )
    }
};

BannerSlider.defaultProps = {
    imgs: [{
        img: "http://qiniu-dlwww.dlhis.com/hou-mobile-hou-hover-banner-13.png",
        desc: "多维度数据接口"
    },{
        img: "http://qiniu-dlwww.dlhis.com/hou-mobile-hou-hover-banner-12.png",
        desc: "24小时实时监控"
    },{
        img: "http://qiniu-dlwww.dlhis.com/hou-mobile-hou-hover-banner-11.png",
        desc: "先进的数学分析模型"
    }]
};
